-- Table: public."ScanTestMaster"

-- DROP TABLE public."ScanTestMaster";
drop table "ScanTestMaster";
CREATE TABLE public."ScanTestMaster"
(
    "ScanTestMasterId" bigint NOT NULL DEFAULT nextval('"ScanTestMaster_ScanTestMasterId_seq"'::regclass),
    "ScanTestName" character varying(250) COLLATE pg_catalog."default" NOT NULL,
    "ScanTestCode" character varying COLLATE pg_catalog."default" NOT NULL,
    "Description" character varying(500) COLLATE pg_catalog."default",
    "Active" boolean NOT NULL DEFAULT true,
    "CreatedBy" bigint NOT NULL,
    "CreatedDate" timestamp without time zone NOT NULL,
    "ModifiedBy" bigint,
    "ModifiedDate" timestamp without time zone,
    "Duration" smallint,
    "ScanClassificationId" integer,
    CONSTRAINT "PK_ScanTestMaster_ScanTestMasterId" PRIMARY KEY ("ScanTestMasterId"),
    CONSTRAINT "FK_ScanTestMaster_CreatedBy" FOREIGN KEY ("CreatedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "FK_ScanTestMaster_ModifiedBy" FOREIGN KEY ("ModifiedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "ScanTestMaster_ScanClassificationId_fkey" FOREIGN KEY ("ScanClassificationId")
        REFERENCES public."ScanClassification" ("ScanClassificationId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public."ScanTestMaster"
    OWNER to postgres;